package com.coco.bargain.controller;

import com.coco.bargain.pojo.TbBargainUserHelp;
import com.coco.bargain.service.BargainUserHelpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: guofeng
 * @Date: 2021/07/22/15:29
 * @Description:
 */
@RestController
@RequestMapping("/bargain/helpUser")
public class BargainUserHelpController {

    @Autowired
    private BargainUserHelpService bargainUserHelpService;

    @GetMapping("/findById/{id}")
    public TbBargainUserHelp findById(@PathVariable("id") Long id) {
        return bargainUserHelpService.findById(id);
    }

    @RequestMapping("/add")
    public void add(@RequestBody TbBargainUserHelp tbBargainUserHelp){
        System.out.println(tbBargainUserHelp);
        bargainUserHelpService.add(tbBargainUserHelp);
    }
}
